package com.example.project.service;

import com.example.project.entity.Address;
import com.example.project.mapper.AddressMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Lenovo
 * @version 1.0
 * @date 2025/5/7 18:31
 * @className AddressService
 */
@Service
public class AddressService {
    @Autowired
    private AddressMapper addressMapper;

    public List<Address> getAllAddresses(Integer userId) {
        return  addressMapper.getAllAddresses(userId);
    }

    public Address getAddressById(Integer addressId) {
        return  addressMapper.getAddressById(addressId);
    }
}